cleaned up, added plug and play direction choosing framework