Rewrite from start

Remove gitty dependency
Use environment variables