Basic IA, now need some serious refactoring.