Frontend fixes
Refactored frontend