Issue #132: moved some methods around in source file