started to clean up and structure the code better in order to clear all bugs