Added error checks and unicode support in main.c
Fixed merge and small fixes to component and power