Added a debug for testing purposes; minor edits to expression