refactor clear-x code into modules

/cc @ianstormtaylor created the modules for the clear-x components and converted the code!