Cleanup and modularize components