more frontend code refactoring