Includes

Includes were moved from .h to .cpp, unnecessary includes were removed, ifndefs were removed, flags for mysql were added to config.mk