code cleanup, even more jQuery-like