removed unneccessary code
code cleanup and license header