Using function declaration for controller example

Much more simple as we haven't introduced module and dependency injection yet, also added some sample text as in the article example.