Cleaned out legacy code, refactored and removed some code repetition.