Refactoring

Cleaned Up a bit