Add README and move implementation to a different file