Refactor to use shared form