refactor and rebuild shares page