Several small code fragments i wrote.