pushed all methods to class functions. cleaned up tileconv.cpp