Refactor, delete unused line and redundant brackets