add implementation for timer arguments, and cleanup code a bit