Version 0.8: Cleaned up code in lib directory