Adding some new functionality,removing long lines