Cleaned up code and added requirements.txt