added depends.
minor build fixes.
fixed minor profile bug, minor cleanup.
Merge pull request #12 from olear/master

merge with dev fork.