Cleaned up code, attempting to compile