Fixed issues and remove redundant js