Added some initial tests
Added more tests
Refactored `$render`