Merges singleapp lib with the core.

singleapp is always used and consists of only two files.
The ui stuff is always used. Also merged to the core.

Closes #13