Added an API for versions. Watch out as this may change drastically...