Refactoring of code, made for OOP and better comprehension. Bug fixes to
data structure.