Went through some major refactoring