Fixed the core of the program. doing views