Fixed multiple bugs and added that variables are defined by type in lines.