Refactored code to put control structures in CircuitBoardAdapter.java instead of MainActivity.java

Signed-off-by: Eric Payne <e.payne@utoronto.ca>