Moved Controller into the directive. To make it isolated.