Refactor code

	fix sudo check order (used to happen after commands)
	use localhost for hostname
Add preview snapshot
Add create snapshot
Add rollback to snapshot
Fix branch method names
Add get branches
Add create/select/delete branch
Release v1.0.3.