WIP - Cleaned some code