Refactor for frontend, added libraries for autocomplete