Refactor: Created factories and controllers

I refactored the code to break the data out into factories and created
individual controllers for samples that required a controller. Some
samples I removed the controller from the markup as it was unnecessary.