moved some dropdown model code into a factory

changed Model JS function to angular app.value