adding support for initialization scripts and tons of bug fixes