basic type inference
better handling of range and exp
minor doc update