Previous rearrangement did not work, re-arranged libraries and refferences further