Remove unnecessary javascript and restructure build