Basic changes to support issue 5

Please have a look at these changes.