cleanup code to make JSHint happy