Adds method keyword args

Thanks to @daviesian and @meredydd.

I've merged it with the formatting branch, fixed the google closure issues and added a test.