removes unneeded destructor
add more asserts
fix formatting