added autocomplete. refactored init to defun.

fixed some problems from previous commit (package archives included
wrong). added when for gui emacs (theme only loads in gui, etc).