Did some refactoring. Removed some silly code.