move lib to root and cli to subfolder, update readme, bugfixes