Forcked from http://sourceforge.net/projects/racksmith/