Improve lock
Bunch of clean up and refactoring
Better loading feedback