Fixed caption issue, refactoring.
Cleanup