Misc fixes and samples