test(surface): add & fix unit tests fix(surface): bugs refactor(surface): minor refactors & some edge-case handling