Modularize frontend