Added lots of compile-time checks