Remove dataType enforcing and cleanup javascript