Silicon Based Heterojunction Solar Cells and Photodetectors