Removed anonymous functions. Fixes #6