Initial powerline setup for OSX

Plus various other tweaks and fixes