Clean code

It closes #69 and #72