Creating atoms and eliminating redundant variables

Not complete!