First pass. System works, but interfaces aren't correct and has some potential memory issues.