separated into class files and updated readme accordingly