Performance

The following commits improve performance heavily; I managed to cut down using these by half