Code base clean up

- Clean up code base.
- Updated libraries.