fixes clock.
adds debug-main-method.
clean up.
tries to fix staticFunction.