Added template and fixed ui issues.