Moved most of bootstrap code to separate JavaScript modules.