implemented most of the basic callbacks. Need to think twice about the test cases. Also changed the license from Apache to LGPL 3.0