big refactor and new layout