Refactored and cleaned +80% of the code.