Cleaned up the js