more clean up, changing of function names; fixed swap resize