Merged ui into core. Use of Sprites and Groups.

Many changes regarding the overall architecture.