Factored into separate scripts, added sample