Clean up code - removed `then` usage