Apply new code style and optimize imports
StatSampler is now fired only once and not immediately, but after the given interval. Some log.trace()s have been guarded. Some comments have been added or modified. Some methods have been renamed