some Debugging done, serious bugs need fixing though.