Adding code for gui and sample gui usage.