Debugged some bugs, refactored code