Lxc refactor

Review with @thatch45 , i'm opening this PR just to have a github diff view on my work in progress on getting the new lxc stuff done.

Ill change the title when done.