Separate commits

Separated commits into distinct groups and reordered them.