start refactor client-side - base structure