Seperated control script and markup

The controls script is now being added during the build, instead of within the markup.