Library corrections

Library corrections and simulation completed