Fixed sbuilds indentation and improved the selectSlot( ) function.