Fixed js bugs and renamed files to make them fall inline with edX conventions