fix errors with target of target, clean up code