Made control and caption location configurable.