Cleaned up a bit, pre refactoring