Added checking for correct number of start/end elements

Added safeguards during the renderStage function so that it will not
render and safe the stage unless there is exactly one start element and
at least one goal element. If the condition(s) are not met, the client
will give an alert based on which conditions failed.