Removed lot's of useless code, started migration to MySQL