Added requirements.txt and code cleanup