Bug fixes and improvements.
New file containing specified definitions as ordinary functions.
Separated specified ordinary functions from support functions.