Optimize Source code