Minor updates to init.
Multiple updates:

    * Made common code in init into functions.
    * Setup init to mount /dev/pts and /dev/shm.