Code cleanup

Refactoring time.