fix behavior of keyword args with declared types
add tests for keyword args
add lots of comments