First commit adds basic implementation and some tests