Reworked main file somewhat, more integrated now