added timers & array typehints, cleaned up code and comments