Sprint 3 FINAL COMMIT

various changes and bug fixes