Adding type specs, type conversion macros, cleaning up code
Adding features into doc