Completed separation of thread/userprog code