Tests

Trying to submit smaller commits (most of this was just rewriting some
part of code)