Refactorings and solved issue (tables were always on the right)