Cleaned up logging a bit..should improve performance slightly