Added basic install function and better cmdline stuff.