Tweaked some structure, less variables, less calls.