Working on cleanup of code