Moved code to modular methods

Moved init calls to init method, added variables to store yPos,
pertinent delays. Also removed old code assumptions that monitor is on
top, using locatePeripheral to locate the monitor.