for the check engine light, you might want to get a "Oil Service Light Reset Tool with Engine Fault Code Reader" (quoted from bavauto.com, bmpdesign.com also sells similar tools). if you cant seem to find out what is wrong, perhaps a error code will come up with the tool.
The Brake lining light is set off when the sensor near the pad touches the rotor. these are supposed to be replaced everytime the pads are changed, but sometimes can be resued if it was not broken when the sensor itself is removed. On bavauto.com these are called "Brake Pad Wear Sensor Wire" and they are pretty cheap. check to make sure your pads are not too worn down. if there is still some brake material left, remove the old sensor and snap in a new one, its really easy.