added partial sphinx interface, fixed package config, implemented system environment hooks