Added some tests, fixed first step of gamma encryption