Add asserts

Close #2