Cleanup and improvement on algorithm elements

Signed-off-by: Arné Schreuder <arn3@arn3.com>