reorganase code, fix little problems, begin work on view