some cleanup, changed return values typing way to more similar to normal one
#7 fixed up do...while
#12 removed case null