Refactored to look much better