cleaned up repo and improved portability