Did some file organization. Fixed the php problem, connected to database