Added olog and various bug fixes.