It would be useful to know which libraries you are using, for the external ones I add a link to the library as a comment opposite the #include line in the code.
Why dont you remove all the bits you dont need, and post that code, much easier for others to see whats going on …