Merged Code

With UI