remove unnecessary code and new lines