Implement dynamic class loading
Refactor gui code