added many new things and tests
Added many tests etc.
major changes to structure