Feature/add vanilla js support

`init = calcSpace` instead of the whole function. It's basically the same function for now.