Optimize code base of framework