Study of a surface phase transition and the effects of finite size and boundaries