API reorganisation for version 0.7

Please feel free to comment on the changes I have made.