Updated extension library and added preliminary console command support.

Updated extension loading library.
Added console support and better shutdown handling.