update to use r app form phase 3

Left:
1. theme
2. rule engine
3. error handling