removing some js code duplication and deleting the build-output file