Moved stuff into separate package
Added tests