Various elisp fixes for byte compliation and a startup error