Fixed bug in generating dummies
Added logic declarations