Added convenience val() and bind() functions to statement

Also simplified template specializations and added documentation.