Wrapped console in anonymous function.
Added cin() function
(bug)cin() does not wait for user-input