create split window function
added an assortment of stuff from a blog
init changes
various tweaks and changes