Change implementation of HALT in RT
Add pend stuff
New application.core