Refactored, removed old stuff