Updated to use require js and components