Added border controls. General fixes.