Various useful tools and pieces of codes