cleaned up source code, attention to line lengths