changed base application structure
added the ability to pass functions as a component options + tests