Cleaned up code
Updated main file