Added a more flexible way of loading libraries procedurally.