refactor target handling
don't discard on build failure
default build mode to install fixes #17