Improved self parameter detection, added closure binding where possible. Closes #48