Various improvements, added some TODO also
Added type bool, more TODOs