Added procedure and boolean function

Worked for far too long without commiting.