Added support for return key type and a few other minor bugfixes[D