Cleaned up the main file significantly

Everything has its own functioning class