final clean up with better comments and deletion of unnecessary things.