updating code base and cleaning