Various fixes and addition of sample package.