Examples fixes and general cleanup