Added an Apache License and removed some dead code.