Updated UI, Tests and refactoring