refactored. js&css validation added