added the option to compile for release  or debug. release is significantly faster !
removed the sleep time, for better accuracy. this change is only temporary
made some slight optimimzations