Added Comments and removed old pieces of code