removed old source code lines

removed old source code lines and did some improvements