reworked base code so it should be working bug-free; reordered functions DOM-dependent to ready() chunk